package com.example.langchain4j;

import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.core.env.ConfigurableEnvironment;

@SpringBootApplication
@Slf4j
public class LangChain4jApplication {

    public static void main(String[] args) {
        ConfigurableApplicationContext applicationContext = SpringApplication.run(LangChain4jApplication.class, args);
        ConfigurableEnvironment env = applicationContext.getEnvironment();
        log.info("""
                \n
                -------------------------------------------------------------------------------
                Application: '{}' is running Success!
                Local URL: 	http://localhost:{}
                Api Document:	http://localhost:{}/doc.html
                -------------------------------------------------------------------------------
                """,env.getProperty("spring.application.name"),
                env.getProperty("server.port"),
                env.getProperty("server.port"));
    }
}